package com.design.proxy.file2;

public class ProxyDemo {
    public static void main(String[] args) {
        File file = new FileProxy("sensitiveFile.txt", true);

        // 用户 admin 尝试读取敏感文件，应该成功
        file.read();

        // 普通用户尝试读取敏感文件，应该被拒绝访问
        File file2 = new FileProxy("sensitiveFile.txt", false);
        file2.read();
    }
}
